package com.project.common.commenReturn;

public class Utils {
    public static Result success(Object object){
        Result r = new Result();
        r.setCode(Renum.SUCCESS.getCode());
        r.setSuccess(true);
        r.setData(object);
        return r;
    }

    public static  Result success(){
        return success(null);
    }

    public static Result fail(String code){
        Result r = new Result();
        r.setCode(code);
        r.setSuccess(false);
        return r;
    }

}
